<template>
	<view>
		<block v-if="couponLists.length">
		<block v-for="(item,i) in couponLists" :key="i">
			<yhqItem :item="item" type="lqYhq" @getCouponLists="getCouponLists"></yhqItem>
		</block>
		</block>
		
		<block v-else>
			<noneList></noneList>
		</block>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				couponLists:[]
			};
		},
		onLoad() {
			
		},
		onShow() {
			this.getCouponLists()
		},
		methods:{
			getCouponLists() {
				this.$api.sendRequest({
					url:'/api/coupon/couponLists',
					data:{
						can_receive:1
					},success:res=>{
						console.log(res);
						this.couponLists = res.data
					}
				})
			}
			
		}
	}
</script>

<style lang="scss">

</style>
